package com.kurumi.pojo.coding;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.kurumi.util.StringUtil;

/**
 * 呼吸机使用
 * @author lyh
 *
 */
public class MedicalVentilatorInfo {

	/**
	 * visitGuid
	 */
	private String visitGuid;
	
	/**
	 * 是否使用呼吸机代码(1:是,2:否)
	 */
	private String isUsedMedicalVentilatorCode;
	
	
	/**
	 * 呼吸机使用总时长（小时）
	 */
	private BigDecimal medicalVentilatorUsedHourNumber;
	
	/**
	 * 呼吸机使用明细
	 */
	List<MedicalVentilatorRecord> medicalVentilatorRecords = new ArrayList<MedicalVentilatorRecord>();
	
	@JsonIgnore
	public void clearEmpty(){
		for (int i = this.medicalVentilatorRecords.size()-1; i >=0; i--) {
			MedicalVentilatorRecord medicalVentilatorRecord = this.medicalVentilatorRecords.get(i);
			if(medicalVentilatorRecord.isEmpty()){
				this.medicalVentilatorRecords.remove(i);
			}
		}
	}

	public String getVisitGuid() {
		return visitGuid;
	}

	public void setVisitGuid(String visitGuid) {
		this.visitGuid = visitGuid;
	}

	
	
	public String getIsUsedMedicalVentilatorCode() {
		return StringUtil.meaningStr(isUsedMedicalVentilatorCode);
	}

	public void setIsUsedMedicalVentilatorCode(String isUsedMedicalVentilatorCode) {
		this.isUsedMedicalVentilatorCode = isUsedMedicalVentilatorCode;
	}

	public String getIsUsedMedicalVentilatorName() {
		return StringUtil.getWhetherOrNot(this.getIsUsedMedicalVentilatorCode());
	}

	

	public BigDecimal getMedicalVentilatorUsedHourNumber() {
		return medicalVentilatorUsedHourNumber;
	}

	public void setMedicalVentilatorUsedHourNumber(BigDecimal medicalVentilatorUsedHourNumber) {
		this.medicalVentilatorUsedHourNumber = medicalVentilatorUsedHourNumber;
	}

	public List<MedicalVentilatorRecord> getMedicalVentilatorRecords() {
		return medicalVentilatorRecords;
	}

	public void setMedicalVentilatorRecords(List<MedicalVentilatorRecord> medicalVentilatorRecords) {
		this.medicalVentilatorRecords = medicalVentilatorRecords;
	}
	
	
}
